package com.example.warehouse.mapper;

import com.example.warehouse.entity.OutStore;
import com.example.warehouse.page.Page1;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface OutstoreMapper {


    void outstoreAdd(OutStore outStore);

    int getCount(OutStore outStore);

    List<OutStore> FindOutStorePage(OutStore outStore,@Param("page") Page1 page1);

    @Update("UPDATE product set product_invent=product_invent-#{outNum} where store_id=#{storeId}")
    void OutStoreConfirm(Integer storeId,Integer outNum);

    @Update("update out_store set is_out=1 where outs_id=#{outsId}")
    void OutStore(Integer outsId);
}
